﻿using System;
using System.Linq;

using Fuse8.DomainFramework.Common;
using Fuse8.DomainFramework.Domain;

using Fuse8.ContentManagementFramework.Domain.Special;
using Fuse8.ContentManagementFramework.Domain.Commands.CommandParameters;

namespace Fuse8.ContentManagementFramework.Domain.Commands
{
    public abstract class CmsUserGetInformationCommand : BaseEntityParameterCommand<CmsUserInformation, CmsUserGetInformationCommandParameter>
    {        
        #region IEntityCommand<CmsUserInformation> Members

        public override string CacheKey
        {
            get 
            {
                return string.Format("Login_{0};SiteGroup_{1};Site_{2}", 
                    CommandParameter.LoginName, 
                    CommandParameter.SiteGroupId.GetValueOrDefault(0),
                    CommandParameter.SiteId.GetValueOrDefault(0));
            }
        }

        public override string CommandName
        {
            get 
            {
                return "CmsUserGetInformationCommand";
            }
        }

        #endregion
    }
}
